import request from '../utils/request'

// 发送验证码
export const getCode = (data) => {
  return request.post('/get/code', data)
}

// 注册用户
export const userAuthentication = (data) => {
  return request.post('/user/authentication', data)
}

//登录
export const login = (data) => {
  return request.post('/login', data)
}

/**
*学生画像
 * */

// 获取班级数据的接口
export const getClassData = () => {
  return request.get('/teacher/get_class/')
}

// 获取学生数据的接口
export const getStudentData = () => {
  return request.get('/student/data')
}

// 获取学生基础信息/student/get_data/
export const get_data = (studentID, headers) => {
  return request.get('/student/get_data/', {
    headers,
    params: { studentID },
  });
};


//个人成绩分布
export const get_score = (studentID, headers) => {
  return request.get('/student/get_score/', {
    headers,
    params: { studentID },
  });
};

//课程门数
export const get_sourseNumber = (studentID, headers) => {
  return request.get('/student/get_sourseNumber/', {
    headers,
    params: { studentID },
  });
};

//加权成绩
export const get_WeightedScore = (studentID, headers) => {
  return request.get('/student/get_WeightedScore/', {
    headers,
    params: { studentID },
  });
};

//获取学生图书馆借阅数量/student/get_LibraryBorrow/
export const get_LibraryBorrow = (studentID, headers) => {
  return request.get('/student/get_LibraryBorrow/', {
    headers,
    params: { studentID },
  });
};

// 获取学生借阅次数/student/get_BorrowNumber/
export const get_BorrowNumber = (studentID, headers) => {
  return request.get('/student/get_BorrowNumber/', {
    headers,
    params: { studentID },
  });
};

// 加权成绩排名/student/get_GPARanking
export const get_GPARanking = (studentID, headers) => {
  return request.get('/student/get_GPARanking/', {
    headers,
    params: { studentID },
  });
};

//已修/应修学分/student/get_CreditInfo/
export const get_CreditInfo = (studentID, headers) => {
  return request.get('/student/get_CreditInfo/', {
    headers,
    params: { studentID },
  });
};

// 进入图书馆次数/student/get_LibraryNumber/
export const get_LibraryNumber = (studentID, headers) => {
  return request.get('/student/get_LibraryNumber/', {
    headers,
    params: { studentID },
  });
};

// 奖学金/student/get_Scholarship/
export const get_Scholarship = (studentID, headers) => {
  return request.get('/student/get_Scholarship/', {
    headers,
    params: { studentID },
  });
};

// 助学金/student/get_Stipend/
export const get_Stipend = (studentID, headers) => {
  return request.get('/student/get_Stipend/', {
    headers,
    params: { studentID },
  });
};

/**
*办公台
 * */